
import i18n from '@/locales/index'
const { t } = i18n.global
export const sysUrl = {
  positionInfo: {
    add: '/api/system/post/add',
    edit: '/api/system/post/edit'
  },
  sysSupDepartment: {
    add: '/api/system/dept/add',
    edit: '/api/system/dept/edit'
  },
  sysDepartment: {
    add: '/api/system/dept/add',
    edit: '/api/system/dept/edit'
  },
  sysRole: {
    add: '/api/system/role/add',
    edit: '/api/system/role/edit'
  },
  sysStaff: {
    save: '/api/system/user/authRole'
  }
}
export const sysModelItem = {
  positionInfo: [
    {
      label: 'components.jobCode',
      placeholder: 'components.pleaseInputJobCode',
      column: 'code',
      rules: [{ required: true, message: t('components.pleaseInputJobCode') }],
      type: 'input'
    },
    {
      label: 'components.jobName',
      placeholder: 'components.pleaseInputJobName',
      column: 'name',
      rules: [{ required: true, message: t('components.pleaseInputJobName') }],
      type: 'input'
    },
    {
      label: 'common.remark',
      placeholder: 'common.pleaseInput',
      column: 'remark',
      type: 'textarea'
    }
  ],
  sysSupDepartment: [
    {
      label: 'components.partId',
      placeholder: 'common.systemAutoGenerate',
      column: 'id',
      type: 'input',
      disabled: true
    },
    {
      label: 'components.partName',
      placeholder: 'components.pleaseInputPartName',
      column: 'name',
      rules: [{ required: true, message: t('components.pleaseInputPartName') }],
      type: 'input'
    }
  ],
  sysDepartment: [
    {
      label: 'components.partId',
      placeholder: 'common.systemAutoGenerate',
      column: 'id',
      type: 'input',
      disabled: true,
      labelCol: { span: 23 },
      wrapperCol: { span: 23 }
    },
    {
      label: 'components.partName',
      placeholder: 'components.pleaseInputPartName',
      column: 'name',
      rules: [{ required: true, message: t('components.pleaseInputPartName') }],
      type: 'input',
      labelCol: { span: 23 },
      wrapperCol: { span: 23 }
    },
    {
      label: 'components.superiorsPartName',
      placeholder: 'components.pleaseSelectSuperiorsPartName',
      column: 'parentId',
      rules: [{ required: true, message: t('components.pleaseSelectSuperiorsPartName') }],
      type: 'selectTree',
      disabled: true,
      labelCol: { span: 23 },
      wrapperCol: { span: 23 }
    },
  ],
  sysRole: [
    {
      label: 'deviceManage.roleId',
      placeholder: 'common.systemAutoGenerate',
      column: 'code',
      type: 'input',
      disabled: true
    },
    {
      label: 'deviceManage.roleName',
      placeholder: 'deviceManage.pleaseInputRoleName',
      column: 'name',
      rules: [{ required: true, message: t('deviceManage.pleaseInputRoleName') }],
      type: 'input'
    }
  ],
  sysStaff: [
    {
      label: 'deviceManage.roleName',
      placeholder: 'deviceManage.pleaseInputRoleName',
      column: 'roleIds',
      type: 'multiSelect',
    }
  ]
}